package com.chengh.vhr.model;

import lombok.AccessLevel;
import lombok.Data;
import lombok.Getter;

/**
 * 分页接收类
 * @author chengh
 */
@Data
public class PageRequest {
    /**
     * 当前页码
     */
    private int pageNum;
    /**
     * 每页数量
     */
    @Getter(value = AccessLevel.NONE)
    private int pageSize;

    public int getPageSize() {
        return pageSize == 0 ? 10 : this.pageSize;
    }

    public PageRequest(int pageNum, int pageSize) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
    }
}
